package com.hunan.api.catv.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author jiangzhuan
 * @since 2020-12-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("member_right")
public class MemberRight extends Model<MemberRight> {

    private static final long serialVersionUID = 1L;

    /**
     * 自增ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户ID
     */
    private Integer memberId;

    /**
     * 播放权益编号
     */
    private String rightCode;

    /**
     * 权益开始时间
     */
    private Date beginTime;

    /**
     * 权益到期时间
     */
    private Date endTime;

    /**
     * 状态:0，禁用 1，正常
     */
    private Integer state;

    /**
     * 逻辑删除 0删除 1未删除
     */
    private Integer deleted;

    /**
     * 记录创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 记录修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 创建人id
     */
    private Integer createBy;

    /**
     * 更新人id
     */
    private Integer updateBy;


    public static final String ID = "id";

    public static final String MEMBER_ID = "member_id";

    public static final String RIGHT_CODE = "right_code";

    public static final String BEGIN_TIME = "begin_time";

    public static final String END_TIME = "end_time";

    public static final String STATE = "state";

    public static final String DELETED = "deleted";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String CREATE_BY = "create_by";

    public static final String UPDATE_BY = "update_by";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
